package file;

import java.io.File;

public class FileDemo {
    public static void main(String[] args) {
        File file = new File("./demo.txt");
        String name = file.getName();
        System.out.println("文件名:"+name);
        long length = file.length();
        System.out.println("文件的字节数:"+length);

        boolean ce = file.canRead();
        boolean cw = file.canWrite();
        System.out.println("可读:"+ ce);
        System.out.println("可写:"+cw);

        boolean hidden = file.isHidden();
        System.out.println("是否隐藏:"+hidden);



    }
}
